package com.wantup.springboot.boot.service.impl;

import com.wantup.springboot.boot.beans.User;
import com.wantup.springboot.boot.mapper.UserMapper;
import com.wantup.springboot.boot.service.LoginServicr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 2018/11/13 18:52
 */
@Service
@Transactional
public class LoginServicrImpl implements LoginServicr {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(String username, String password) throws Exception {
        return this.userMapper.getUserInfo2(username, password);
    }

    @Override
    public User login(Map<String, String> stringMap) throws Exception {
        return this.userMapper.getUserInfo(stringMap);
    }
}




